//
//  BaseObject.m
//  GLSprite
//
//  Created by Daniel Polak on 7/19/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "BaseObject.h"
#import "BoundingVolume.h"


@implementation BaseObject

@synthesize pBoundingVolume = m_pBoundingVolume;
@synthesize uiTextureID = m_uiTextureID;
@synthesize width = m_Width;
@synthesize height = m_Height;
@synthesize position = m_Position;

- (void)Update {
	
}

- (void)Render {
	
}

- (void)Cleanup {
	
	[super dealloc];
}

- (BoundingVolume*)pBoundingVolume
{
	return m_pBoundingVolume;
}

- (void)setBoundingVolume:(int)type :(float)width :(float)height :(CGPoint)pos
{
	BoundingVolume* pBound = [[BoundingVolume alloc] init];
	switch (type) {
		case 1:
			//setup sphere bounding based on width and starting position
			m_pBoundingVolume = pBound;
			break;
		case 2:
			//setup AABB bounding based on width and height pos being the center of object
			m_pBoundingVolume = pBound;
			break;
		default:
			break;
	}
}


- (CGPoint)position {
	return m_Position;
}

- (void)SetPosition:(CGFloat)x :(CGFloat)y {
	m_Position.x = x;
	m_Position.y = y;
}

- (GLuint)uiTextureID {
	return m_uiTextureID;
}

- (void)SetTextureID:(GLuint)texID {
	m_uiTextureID = texID;
}

- (size_t)width {
	return m_Width;
}

- (size_t)height {
	return m_Height;
}

- (void)SetTextureWidthAndHeight:(size_t)_width :(size_t)_height {
	m_Width = _width;
	m_Height = _height;
}

@end
